#include "mainwindow.h"
#include <DApplication>
#include <QDesktopWidget>
#include <QDebug>
//#include <QRect>
DWIDGET_USE_NAMESPACE

int main(int argc, char *argv[])
{
    DApplication a(argc, argv);
    MainWindow w;
    w.setWindowTitle("clock");
    w.setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::Tool | Qt::WindowMaximizeButtonHint);//去掉标题栏
    w.setAttribute(Qt::WA_X11NetWmWindowTypeDock);
    //w.setAttribute(Qt::WA_TranslucentBackground);//设置透明-窗体标题栏不透明,背景透明
    QDesktopWidget* desktop=QApplication::desktop();//获取屏幕尺寸
    int x=QString(argv[1]).toInt();
    int y=QString(argv[2]).toInt();
    w.setFixedSize(320,150);
    w.move((desktop->width() - x*(w.width()+20)),(y*20+(y-1)*w.height()));
    qDebug()<< "log test - Debug";


    w.show();
    return a.exec();
}
